from selenium import webdriver
import time
from selenium.webdriver.common.by import  By
wd = webdriver.Chrome()
url = "http://baidu.com"
wd.get(url)
time.sleep(2)
sousuo = wd.find_element(By.ID,'kw').send_keys("周杰伦")
baiduyixia = wd.find_element(By.XPATH,'//*[@id="su"]').click()
is_bottom = 'document.documentElement.scrollTop=100000'
wd.execute_script(is_bottom)
time.sleep(5)
xiayiye = wd.find_element(By.CSS_SELECTOR,'#page > div >a.n').click()
time.sleep(5)
wd.back()
time.sleep(5)
wd.forward()
time.sleep(5)
print(wd.page_source)
wd.close()